package com.day19.ex11;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class PropertiesDemo03 {
    public static void main(String[] args)throws IOException {
        myLoad();
    }
    private  static void myLoad()throws IOException{
        Properties prop=new Properties();
        FileReader fr=new FileReader("myOtherStream\\fw.txt");
        prop.load(fr);
        fr.close();
        System.out.println(prop);
    }
    private static void myStore() throws IOException{
        Properties prop=new Properties();
        prop.setProperty("itheima001","林青霞");
        prop.setProperty("itheima002","张曼玉");
        prop.setProperty("itheima003","王祖贤");
        FileWriter fw=new FileWriter("myOtherStream\\fw.txt");
        prop.store(fw,null);
        fw.close();
    }
}
